<ul class="clearfix">
{loop $tags $i $t}
<li><a href="{$t[linkurl]}"{if $target} target="{$target}"{/if}><img class="a-img" src="{str_replace('thumb', 'middle', $t[thumb])}" width="{$width}" height="{$height}" alt="{$t[alt]}"/></a>
<span class="te"><a href="{$t[linkurl]}" title="{$t[alt]}"{if $target} target="{$target}"{/if}>{$t[title]}</a></span></li>
{/loop}
</ul>           

{if $showpage && $pages}<div class="pages">{$pages}</div>{/if}
 